<script type="text/javascript">

var z = z || {};
z.base_cdn_url = '<?php echo m('cdn')->get_base_url();?>';
z.base_site_url = '<?php echo m('app')->get_base_url();?>';

z.cdn_url = function (re_url, protocol) {
    protocol = (protocol) ? protocol : 'http';
    return protocol + '://' + z.base_cdn_url + '/' + re_url;
}
z.site_url = function (re_url, protocol) {
    protocol = (protocol) ? protocol : 'http';
    return protocol + '://' + z.base_site_url + '/' + re_url;
}
</script>
